package cagt.tools.standard.poker.holdem;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import cagt.tools.Deck;
import cagt.tools.standard.Figure;
import cagt.tools.standard.StandardCard;
import cagt.tools.standard.StandardDecks;

/**
 * Static class with TexasHoldem rules constants.
 * 
 * @author Konrad
 * 
 */
public final class Rules {
	/**
	 * Private constructor to make class static.
	 */
	private Rules() {
	}

	/**
	 * Returns the figures of cards used in Texas Holdem in order of their
	 * importance from the least important to the most.
	 */
	public final static List<Figure> holdemFiguresOrder;

	static {
		List<Figure> order = new ArrayList<Figure>();
		// Add all
		order.addAll(Arrays.asList(Figure.values()));
		// Remove joker
		order.remove(Figure.Joker);
		// Remove ace and put it last
		order.remove(Figure.Ace);
		order.add(order.size() - 1, Figure.Ace);
		holdemFiguresOrder = Collections.unmodifiableList(order);
	}

	/**
	 * Returns the size of holdem deck of cards.
	 */
	public final static int sizeOfDeck = getHoldemDeck().size();

	/**
	 * Returns deck used in texas holdem. Alias to StandardDecks.get52Deck();
	 */
	public final static Deck<StandardCard> getHoldemDeck() {
		return StandardDecks.get52Deck();
	}

}
